﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;

namespace MP3tunes.LockerPlayer
{
    public partial class ImageButton : UserControl, INotifyPropertyChanged
    {
        public static readonly DependencyProperty NormalImageProperty = DependencyProperty.RegisterAttached("NormalImage",typeof(object),typeof(ImageButton), null);
        public static readonly DependencyProperty PressedImageProperty = DependencyProperty.RegisterAttached("PressedImage",typeof(object),typeof(ImageButton), null);
        public static readonly DependencyProperty HoverImageProperty = DependencyProperty.RegisterAttached("HoverImage", typeof(object), typeof(ImageButton), null);

        public object NormalImage
        {
            get
            {
                return this.GetValue(NormalImageProperty);
            }
            set
            {
                this.SetValue(NormalImageProperty, value);
            }
        }
        public object PressedImage
        {
            get
            {
                return this.GetValue(PressedImageProperty);
            }
            set
            {
                this.SetValue(PressedImageProperty, value);
            }
        }
        public object HoverImage
        {
            get
            {
                return this.GetValue(HoverImageProperty);
            }
            set
            {
                this.SetValue(HoverImageProperty, value);
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
        public ImageButton()
        {
            InitializeComponent();
        }
    }
}
